const db = wx.cloud.database()

export const registerApi = (data: Recordable) =>
  db.collection('user').add({
    data
  })

export const loginApi = (data: Recordable) =>
  db.collection('user').where(data).get()
